package com.tangyuan.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tangyuan.model.User;
import com.tangyuan.model.UserBlackList;
import com.tangyuan.model.UserConcern;
import com.tangyuan.vo.UserBlackListVo;
import com.tangyuan.vo.VersionVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UserBlackListMapper extends BaseMapper<UserBlackList> {

    @Update("update user_black_list set is_deleted = #{isDeleted} where user_id = #{userId} and black_user_id = #{blackUserId}")
    void updateIsDelete(@Param("userId")Long userId,@Param("blackUserId") Long blackUserId, @Param("isDeleted") Integer isDelete);

    @Select("select * from user_black_list where user_id = #{userId} and black_user_id = #{blackUserId}")
    UserBlackList findBlackList(@Param("userId")Long userId, @Param("blackUserId")Long blackUserId);
}
